package Test.Exam;

import java.util.Scanner;

/**
 * @ClassName Main
 * @since: 2024/3/23 18:40
 * @auth: kirito
 * @description:
 **/
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int a = sc.nextInt();
        int b = sc.nextInt();
        int[] x = new int[n];
        int[] y = new int[n];
        for (int i = 0; i < n; i++) {
            x[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
            y[i] = sc.nextInt();
        }

        int count = 0;
        for (int i = 0; i < n - k + 1; i++) {
            boolean flag = true;
            for (int j = i; j < i + k; j++) {

                if (x[j] < a || y[j] < b) {
                    flag = false;
                    break;
                }
            }
            if (flag) {
                count++;
            }
        }
        System.out.println(count);

    }
}
